
/****** Object:  StoredProcedure [dbo].[web_change_card_descr]    Script Date: 10/19/2013 09:22:25 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

--IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND name = 'web_change_card_descr')
DROP PROCEDURE web_change_card_descr
GO

-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[web_change_card_descr] 
	@type varchar(50),
	@pastabos varchar(255),
	@imkodas varchar(100),
	@kortele varchar(100)
AS
BEGIN

	SET NOCOUNT ON
	
	If (@type = 'ADMIN')
		UPDATE N51_SUTH set N51_PASTABOS =@pastabos,N51_KODAS_KS=@imkodas where N51_KODAS_KT=@kortele			
	else
		UPDATE N51_SUTH set N51_PASTABOS =@pastabos where N51_KODAS_KT=@kortele and N51_KODAS_KS=@imkodas				
	

END

GO

